import React, { PureComponent } from 'react'
import { Provider } from 'react-redux';
import './Cinema.scss'
import request from '../../../api/api'
import CinemaList from './CinemaList/CinemaList'
import store from '../../../redux/store'
export default class Cinema extends PureComponent {
  state = {
    movielist: []
  }
  getMovieList = () => {
    request({
      url:'/api/maoyan/index/moreClassicList?sortId=1&showType=3&limit=10&offset=0',
      method:'get'
    }).then(res => {
      // console.log(res);
      this.setState({
        movielist: res
      })
    })
  }
  componentDidMount() {
    this.getMovieList()
  }
  render() {
    let { movielist } = this.state
    return (
      <div className='jingDiaN'>
        <Provider store={store}>
          <CinemaList movielist={movielist} />
        </Provider>
      </div>
    )
  }
}
